package com.ysg.http;

import java.util.List;

/**
 * 该类仅供参考，实际业务返回的固定字段, 根据需求来定义，
 */
public class BasePageResponse<T> {
    private int code;
    private String message;
    private boolean success;
    private Data<T> data;

    private int resultCode;


    public static class Data<T>{
        private List<T> content;

        public List<T> getContent() {
            return content;
        }

        public void setContent(List<T> content) {
            this.content = content;
        }
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public boolean isOk() {
        return code == 200;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public Data getData() {
        return data;
    }

    public void setData(Data data) {
        this.data = data;
    }

    public int getResultCode() {
        return resultCode;
    }

    public void setResultCode(int resultCode) {
        this.resultCode = resultCode;
    }
}
